import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { DomSanitizer } from '@angular/platform-browser';

@Component({
  selector: 'app-showview',
  templateUrl: './showview.page.html',
  styleUrls: ['./showview.page.scss']
})
export class ShowviewPage implements OnInit {
  curl: string;
  csafeurl: any;
  ctitle: string;
  constructor(public activatedRoute: ActivatedRoute, private sanitizer: DomSanitizer) { }

  ngOnInit() {
    this.curl = this.activatedRoute.snapshot.paramMap.get('curl');
    this.csafeurl = this.sanitizer.bypassSecurityTrustResourceUrl(this.curl);
    this.ctitle = this.activatedRoute.snapshot.paramMap.get('ctitle');
    if (null === this.ctitle || this.ctitle.length === 0) {
      this.ctitle = '图文';
    }
  }

}
